package com.csdj.youxi.service;

import com.csdj.youxi.entity.DevUser;
import com.csdj.youxi.entity.DevUserExample;
import com.csdj.youxi.mapper.DevUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("devUserService")
public class DevUserService implements IDevUserService {
    @Autowired
    private DevUserMapper devUserMapper;

    public DevUser login(String devCode, String devPassword) {
        DevUserExample devUserExample = new DevUserExample();
        devUserExample.createCriteria().andDevCodeEqualTo(devCode).andDevPasswordEqualTo(devPassword);
        List<DevUser> list = devUserMapper.selectByExample(devUserExample);
        return list.get(0);
    }
}
